//
//  UIImageView+SDWebImage.m
//  SmartEstateCC
//
//  Created by 初唐科技 on 2018/2/5.
//  Copyright © 2018年 pretang. All rights reserved.
//

#import "UIImageView+SDWebImage.h"
#import <SDWebImage/UIImageView+WebCache.h>

@implementation UIImageView (SDWebImage)

- (void)ct_setImageWithURL:(NSURL *)url
{
    [self sd_setImageWithURL:url];
    
}

- (void)ct_setImageWithURL:(NSURL *)url
          placeholderImage:(UIImage *)placeholder
{
    [self sd_setImageWithURL:url
            placeholderImage:placeholder];
    
}

- (void)ct_setImageWithURL:(NSURL *)url
          placeholderImage:(UIImage *)placeholder
                 completed:(void (^)(UIImage *, NSError *))completedBlock
{
    [self sd_setImageWithURL:url
            placeholderImage:placeholder
                   completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
                       if (completedBlock) {
                           completedBlock(image, error);
                       }
                   }];
}

@end
